import { default as request, cloud } from '@/framework/utils/request'

export default ({

  // 分页查询
  pageReport(params) {
    return request({
      url: cloud.dqbasic + '/talk/pageReport',
      method: 'get',
      params
    })
  },

  // 获取组织树
  getOrgTree() {
    return request({
      url: cloud.dqbasic + '/hrOrganization/currentTree',
      method: 'get'
    })
  },

  // 获取党员
  getPartyMember(id) {
    return request({
      url: cloud.dqbasic + '/partyMember/query',
      method: 'get',
      params: {
        'orgIds': id
      }
    })
  },

  // 新增或修改
  addOrUpdate(data) {
    return request({
      url: cloud.dqbasic + '/talk/addOrUpdate',
      method: 'post',
      data
    })
  },

  // 分页查询谈话详情列表
  pageDetail(params) {
    return request({
      url: cloud.dqbasic + '/talk/pageDetail',
      method: 'get',
      params
    })
  },

  // 查看
  getTalkDetail(id) {
    return request({
      url: cloud.dqbasic + '/talk/detail',
      method: 'get',
      params: {
        'id': id
      }
    })
  },

  // 删除
  deleteTalk(id) {
    return request({
      url: cloud.dqbasic + '/talk/delete',
      method: 'post',
      data: id
    })
  }

})
